<script type="text/jsx">

import MyDateTime from './component/my-date-time'
import TextView from "./component/text-view"
import ObjectView from "./component/object-view"
import RemoteArrayView from './component/remote-array-view'
export default {
  name: "OrderInfoItem",
  components:{
    MyDateTime,
    TextView,
    ObjectView,
    RemoteArrayView
  },
  props:{
    element:Object,
    values: Object,
    orderId: Number
  },
  render(h, context) {
    let children = [
        h('div',{
          style:{
            width: "100px",
            textAlign:'right',
          }
        },this.element.label),
        h(this.element.tag,{
          "class":{
            ml10: true
          },
          style: this.element.style ? this.element.style :null,
          props:{
            element: this.element,
            value: this.values,
            orderId: this.orderId
          }
        })
    ]
    return h('div',{
      "class":{
        flex:true
      }
    },children)
  }
}
</script>
<style lang="scss" scoped >
.ml10 {
  margin-left: 10px;
}
.flex {
  display: flex;
  align-items: center;
}
</style>

